package com.wuyancheng.controller;

import com.wuyancheng.service.ILoginService;
import com.wuyancheng.service.IResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class LoginController {

    @Autowired
    private ILoginService loginService;

    @Autowired
    private IResumeService resumeService;

    @RequestMapping("/login")
    public String login(String username, String password){
        if(loginService.checkPermission(username,password)){
            return "redirect:/resume/query";
        }
        return "failed";
    }
}
